package com.yyplatform.admin.platform.role.model.entity;

import java.io.Serializable;

import com.yyplatform.admin.infra.model.entity.BaseEntity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;

/**
 * Created on 2024-09-12
 */
@Entity
@Getter
@Setter
@Table(name = "sys_dept")
public class SysDeptEntity extends BaseEntity implements Serializable {


    @Column(name = "name", nullable = false, columnDefinition = " varchar(50) comment '部门名称' ")
    private String name;

    @Column(name = "remark", columnDefinition = " varchar(255) comment '部门描述' ")
    private String remark;

    @Column(name = "enabled", nullable = false, columnDefinition = " tinyint(1) comment '是否启用' ")
    private Boolean enabled;

    @Column(name = "order_num", nullable = false, columnDefinition = " int(5) comment '排序' ")
    private Integer orderNum;


    @Column(name = "pid", nullable = false, columnDefinition = " bigint(20) comment '父部门id' ")
    private Long pid;


    @Column(name = "sub_count", nullable = false, columnDefinition = " int(5) comment '子部门数' ")
    private Integer subCount = 0;


}
